<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = ["a", "b", "c", "d", "e", "f"];

        // 删除
        // arr.splice(2,1);
        // console.log(arr);

        // 替换功能  第三个参数四个,五个....(替换的元素)
        arr.splice(2,1,'m','n');
        console.log(arr);
    </script>
</body>
</html>